﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BillsForRazorPages.Models
{
    public class Bill
    {
        public int Id { get; set; }

        [Display(Name = "描述")]
        [StringLength(60, MinimumLength = 2)]
        [Required]
        public string Content { get; set; }

        [Required]
        [Display(Name = "价格")]
        [Column(TypeName = "decimal(18,2)")]
        public decimal Price { get; set; }

        [Required]
        [Display(Name = "日期")]
        [DataType(DataType.Date)]
        public DateTime BillDate { get; set; }

        [Required]
        [Display(Name = "类别")]
        public string Category { get; set; }

        [Required]
        [Display(Name = "使用者")]
        public string User { get; set; }
    }
}
